import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 商品分类
 */
@Entity('mall_category')
export class MallCategoryEntity extends BaseEntity {
  @Column({ comment: '分类名称', length: 255 })
  name: string;

  @Column({ comment: '分类图片', length: 255, nullable: true })
  pic: string;

  @Column({ comment: '父类ID', nullable: true })
  parentId: number;

  @Column({ comment: '排序值', default: 0 })
  order: number;
}
